Skip to content

feat(driver): expose Ferrum console as Driver#console - #351

Merged
route merged 2 commits into
mainfrom
feat/driver-console
Oct 27, 2026
Merged

route merged 2 commits into
mainfrom
feat/driver-console

Conversation

@route

@route route commented Oct 27, 2026

Copy link
Copy Markdown
Member

Closes #113.

page.driver.console is Ferrum's Console for the current page: console.* calls, browser log entries and uncaught exceptions. It's Enumerable over the last 1000 messages and is cleared on reset, since every test gets a fresh page.

Until now the only way to see what the page logged was to pass a :logger and filter CDP frames out of its output. With Ferrum 0.20 that output also carries Chrome's own stderr, so those filters let browser noise through. rails_admin's ConsoleLogger is one example.

after { expect(page.driver.console.select(&:error?)).to be_empty }
after { page.driver.console.each { |message| warn(message) } }

Includes the ferrum ~> 0.20.0 bump the console API needs.

@route
route merged commit a0e6c48 into main Oct 27, 2026
6 checks passed
@route
route deleted the feat/driver-console branch October 27, 2026 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Be able to see just console.log/console.error etc without all debug output

1 participant